from django.db import models

# Create your models here.


class CrudDemoModel(models.Model):
    id = models.BigAutoField(primary_key=True, help_text="Id", verbose_name="Id")
    meterNo = models.CharField(max_length=255, verbose_name="电表ID")
    value = models.FloatField(max_length=255, verbose_name="值")
    unitName = models.CharField(max_length=255, verbose_name="单位")
    paramName = models.CharField(max_length=255, verbose_name="名称")
    time = models.DateTimeField(verbose_name="时间")

    class Meta:
        db_table = "electric_meter"
        verbose_name = '电表'
        verbose_name_plural = verbose_name
        # ordering = ('-create_datetime',)


class CrudDemoModel1(models.Model):
    id = models.BigAutoField(primary_key=True, help_text="Id", verbose_name="Id")
    content = models.TextField(verbose_name="电表内容")


    class Meta:
        db_table = "shuidian"
        verbose_name = '电表'
        verbose_name_plural = verbose_name
        # ordering = ('-create_datetime',)
